[p] -> { [n, m] -> (n + n^2) : n >= 1 and m >= n and m <= p }
